/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Yi Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/
 * @date:        2019/12/8 4:39 下午
 * @email:       xiazhaoyang@live.com
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.example.spring.event.listener;

import com.example.spring.event.source.MailSendEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 普通消息监听【不支持类型过滤，需要自定义消息结构来实现过滤的逻辑】
 * </p>
 *
 * @author Yi
 * @version V1.0.0
 * @date 2019/12/8 4:39 下午
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人}  2019/12/8
 * @modify reason: {方法名}:{原因}
 * ...
 */
@Component
public class MailSendListener implements ApplicationListener<MailSendEvent> {

    @Override
    public void onApplicationEvent(MailSendEvent event) {
        System.out.println("MailSendListener 收到一份邮件：" + event.getMessage());
    }
}
